/**
 * 游戏起始
 * @author 
 *
 */
class Game {

	public constructor() 
    {
	}
	
    public static SceneManager: SceneManager;
    
    public static StageScene: BaseScene;

    public static Config:Config;
    
    public static Background: egret.DisplayObjectContainer;
    public static View: egret.DisplayObjectContainer;
    public static Popup: egret.DisplayObjectContainer;
    public static System: egret.DisplayObjectContainer;
    public static Stage: egret.Stage;

    public static stage: egret.Stage;

	
    // 起始调用序列
    public static init(stageScene: BaseScene) 
    {
        Game.Stage = egret.MainContext.instance.stage;
        Game.StageScene = stageScene;
        Game.Background = stageScene.getBackgroundLayer();
        Game.View = stageScene.getViewLayer();
        Game.Popup = stageScene.getPopupLayer();
        Game.System = stageScene.getSystemLayer();
        
        // 配置
        // Game.Net = new NetController();
        // Game.DataUtils = new DataUtils();
        // Game.Config = new Config();
        // Game.CellType = new CellType();
        // Game.MapData = new MapData();
        // Game.User = new UserInfo();
        
        // 启动
        Game.SceneManager = new SceneManager();
        //Game.PopupManager = new PopupManager();
    };
        
    public static launch(): void 
    {
        // 初始
        //App.MapData.init();
        // 启动
        //App.MapData.launch(new egret.Point(Utils.random(0,5),Utils.random(0,6)));
    }
}
